/*
循环数组，必须每一项都符合条件，全部符合则返回true,有一个不符合则返回false
 */
//every遍历，必须保证每一个回调函数都返回true,假如有一个false则中断循环，返回false
//every是空数组则返回true
const arr1 = [
  { name: "张三", age: 13 },
  { name: "李四", age: 14 },
];
const isBoollen1 = arr1.length ? arr1.every((v) => v.age > 10) : false;
console.log("isBoollen1", isBoollen1);
//console isBoollen1 true

const arr2 = [
  { name: "张三", age: 13 },
  { name: "李四", age: 14 },
];
const isBoollen2 = arr2.length ? arr2.every((v) => v.age > 13) : false;
console.log("isBoollen2", isBoollen2);
//console isBoollen2 false
